<?php
/**
 * Created by PhpStorm.
 * User: Thans
 * Date: 2018/6/1
 * Time: 上午1:12
 */

namespace app\admin\controller\view;

use app\common\controller\Admin;
use think\facade\Request;

class MenuController extends Admin
{
    public function index(){
        return $this->fetch();
    }
    public function add(){
        $id = Request::get('id')?:0;
        $this->assign('parent_id',$id);
        return $this->fetch();
    }
    public function edit($id){
        if(!$id){
            $this->error('参数异常',url('/admin/menu'));
        }else{
            $this->assign('id',$id);
            return $this->fetch();
        }
    }
}